package com.pur.zsms.pmsnmanage.user.dao;

import java.util.List;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.financing.vo.FinancingVo;
import com.pur.zsms.pmsnmanage.menu.po.MenuPo;
import com.pur.zsms.pmsnmanage.user.po.LdAddressPo;
import com.pur.zsms.pmsnmanage.user.po.UserLevelPo;
import com.pur.zsms.pmsnmanage.user.po.UserPo;
import com.pur.zsms.pmsnmanage.user.po.UserRolePo;
import com.pur.zsms.pmsnmanage.user.vo.UserVo;
import com.pur.zsms.shopmanage.po.ShopPo;
import com.pur.zsms.supplier.po.SupplierPo;
import com.pur.zsms.supplier.po.SupplierTypePo;
import com.pur.zsms.supplier.vo.SupplierVo;

public interface IUserDao {

	/**
	 * 查询出所有用户信息
	 * 
	 * @param 查询条件封装在UserVo中
	 * @return
	 */
	public PaginationSupport listUser(PageController pageController, UserVo userVo) throws GenericException;

	public PaginationSupport listUserForSupplierShop(PageController pageController, UserVo userVo) throws GenericException;

	/**
	 * 根据用户ID查询出所有用户信息
	 * 
	 * @return
	 */
	public UserPo listUserByUserId(String userId) throws GenericException;

	/**
	 * 根据userName查寻用户信息
	 * 
	 * @param userName
	 * @return
	 */
	public List<UserPo> findByUserName(String userName) throws GenericException;

	/**
	 * 新增用户信息
	 */
	public void addUser(UserPo c) throws GenericException;

	/**
	 * 新增用户信息
	 */
	public void addUserRole(UserRolePo c) throws GenericException;

	public void addSupplierTypePo(SupplierTypePo c) throws GenericException;

	/**
	 * 新增用户信息
	 */
	public void addUserLevel(UserLevelPo c) throws GenericException;

	public void updateUserLevel(UserLevelPo c) throws GenericException;

	/**
	 * 修改用户信息
	 */
	public void updateUser(UserPo c) throws GenericException;

	/**
	 * 删除用户信息
	 */
	public void deleteUser(String userId) throws GenericException;

	/**
	 * 根据用户ID查询出该用户所有角色信息
	 * 
	 * @param UserId
	 *            用户ID
	 * @return 用户角色信息
	 */
	public List<UserRolePo> listUserRoleByUserId(String userId) throws GenericException;

	/**
	 * 更新用户角色信息
	 * 
	 * @param UserRolePo
	 *            用户角色信息
	 * @return
	 */
	public void updateUserRole(UserRolePo userRolePo) throws GenericException;

	/**
	 * 根据用户角色ID删除用户角色信息，因为使用主键删除，所有只删除一条记录
	 * 
	 * @param UserRoleId
	 *            用户ID
	 * @return 用户角色信息
	 */
	public void deleteUserRole(String userRoleId) throws GenericException;

	/**
	 * 根据用户ID删除该用户所有角色信息
	 * 
	 * @param UserId
	 *            用户ID
	 * @return 用户角色信息
	 */
	public void deleteUserRoleByUserId(String userId) throws GenericException;

	/**
	 * 根据用户名查找用户
	 */
	public UserPo findUserLogon(String userName, String password) throws GenericException;

	/**
	 * 查询用户所对应菜单
	 * 
	 * @param userId
	 * @return
	 */
	public List<MenuPo> getUserMenuList(String userId) throws GenericException;

	public List<UserPo> getAllUserPo() throws GenericException;

	public List<UserPo> getUserForSup(long supId) throws GenericException;

	public List<UserLevelPo> getCompanyUser(UserPo lg) throws GenericException;

	public List<UserLevelPo> getUserLevelPoByUserId(long userId) throws GenericException;

	public List<ShopPo> getUserPoListByUserIdString(String userIdString) throws GenericException;

	public List<UserPo> getUserPoListByUserNameOrUserPhone(String userName, long userPhone) throws GenericException;

	public List<UserPo> getUserPoListByOpenId(String openId) throws GenericException;

	public List<UserPo> getUserPoListByUserName(String userName) throws GenericException;

	public List<UserPo> getUserPoListByRealName(String userName) throws GenericException;

	public List<UserPo> getUserPoListByUserPhone(String phone) throws GenericException;

	public List<UserPo> getAllCustUserPo() throws GenericException;

	public List<UserPo> getUserForShop() throws GenericException;

	public List<UserPo> userForSupplierShop(long supId) throws GenericException;

	public List<ShopPo> getShopForSupplier(int supId) throws GenericException;

	public List<Object> getSupType(long supId);

	public List<ShopPo> getShopForAdmin(long companyUser) throws GenericException;

	public List<ShopPo> getShopForManager(long userId) throws GenericException;

	public List<ShopPo> shopForAccountant(long userId) throws GenericException;

	public List<UserPo> getUserForShopByShopId(long shopId) throws GenericException;

	public List<UserPo> getUserForShopByShopIdAndLevel(long shopId, int level) throws GenericException;

	public List<ShopPo> getUserPoByOrderDateAndSupId(String orderDate, int supId) throws GenericException;

	public List<ShopPo> getUserPoByOrderDateAndSupIdForNotExistsCompanyPeriod(String orderDate, int supId) throws GenericException;

	public List<ShopPo> getShopPoByOrderDateAndSupIdForDistribute(String orderDate, int supId) throws GenericException;

	public List<ShopPo> getUserPoByOrderDateAndUserId(String orderDate, String shopId) throws GenericException;

	public List<UserPo> getAllUserPoBylevelOrProvinceAndCityAndCountry(UserVo userVo) throws GenericException;

	public List<UserPo> getUserForSupplierCompany(SupplierVo c) throws GenericException;

	public List<UserPo> getAllUserPoBylevelOrProvinceAndCityAndCountryForcheck(UserVo userVo) throws GenericException;

	public List<UserPo> getAllUserPoForCust() throws GenericException;

	public List<ShopPo> getStoreCustUserPoForCust() throws GenericException;

	public List<LdAddressPo> getProvince() throws GenericException;

	public List<LdAddressPo> getCity(int parentId) throws GenericException;

	public List<LdAddressPo> getCountry(int parentId) throws GenericException;

}
